package com.baidu.customview.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by JGW-android on 2016/3/2.
 */
public class RobotBean implements Parcelable {
    private int icon;
    private String name;

    public RobotBean(int icon, String name) {
        this.icon = icon;
        this.name = name;
    }

    public int getIcon() {
        return icon;
    }

    public void setIcon(int icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.icon);
        dest.writeString(this.name);
    }

    protected RobotBean(Parcel in) {
        this.icon = in.readInt();
        this.name = in.readString();
    }

    public static final Parcelable.Creator<RobotBean> CREATOR = new Parcelable.Creator<RobotBean>() {
        public RobotBean createFromParcel(Parcel source) {
            return new RobotBean(source);
        }

        public RobotBean[] newArray(int size) {
            return new RobotBean[size];
        }
    };
}
